﻿-bool canedit = user.HasPermission("kbadmin")
-string pars = "";
#content.popup
  %h1 
    %img.icon24{src="img/headericons/kb.png"}
    База знаний
    -if(canedit)
      %a.noul{href="kb.ivp/create",target="kb"}
        %img.indent10.middle{src="img/buttons/create.gif"}
    %form{name="searchform", action="kb.ivp/search", target="kb" method="post"}
      =HTMLHelper.HiddenInput("selectedfolderid","")  
      .searchstring
        %table
          %tr
            %td
              %input.relative{type="image", src="img/buttons/search.gif", alt="Поиск", title="Поиск", align="top", onclick="KBSearch()", style="top:-4px"}
              %input.relative#search{name="searchstring",type="text",value="",onkeydown="return doKBSearch(event)", style="top:-2px"}              
            %td
              .indent10
                =HTMLHelper.Radio("searchwhere", "folder", false, " в текущем разделе", "rb")
            %td
              .indent10
                =HTMLHelper.Radio("searchwhere", "everywhere",  true, " везде", "rb")
  %iframe#treeholder{src=string.Format("kb.ivp/treeframe?{0}",pars),width="100%",height="100%",style="border: 1px solid #ccc;"}
